<h3><?php echo $this->title?></h3>
<div class="upload-image">
<form action="/admin/file-upload/list" method="get">
    <h4>Tìm kiếm</h4>
    <table class="table table-condensed">
        <tr>
            <td><label for="name">Name:</label></td>
            <td><input id="name" name="name" value="<?php echo $this->params['name'];?>" /></td>
        </tr>
    </table>
    <div class="control-group">
        <div class="controls">
          <button type="submit" class="btn">Search</button>
        </div>
  </div>
</form>
<a href="/admin/file-upload/upload" style="font-weight: bold">Upload mới</a>
<?php if(is_array($this->uploads)) {?>
    <table class="table table-bordered table-striped">
        <thead>
              <tr>
                <th>Id</th>
                <th>Name</th>
                <th>Link</th>
                <th>Created date</th>
              </tr>
        </thead>
        <tbody>
            <?php foreach($this->uploads as $upload) : ?>
             <tr>
                 <td><?php echo $upload['id']?></td>
                 <td><?php echo $upload['name']?></td>
                 <td><textarea rows="3" cols="100" style="width: 450px; font-size: 10px;"><?php echo 'http://fmit.vn/upload/documentary/files/' . $upload['file_name']?></textarea></td>
                 <td><?php echo date('d/m/Y', $upload['dateline'])?></td>
             </tr>
             <?php endforeach;?>
        </tbody>
      </table>
      <?php echo $this->paginationcontrol2($this->page, $this->totalItem, $this->numRowPerPage, 'pagination.phtml', $this->currentUrl);?>
</div>
<?php } else {?>
<div>Không có file nào!</div>
<?php }?>
